<ul class="breadcrumb">
  <li><a href="/">首页</a> <span class="divider">/</span></li>
  <li><a href="/tclasses">课程信息</a> <span class="divider">/</span></li>
  <% tc = Tclass.find(params[:cid].to_i) %>
  <li><%= link_to tc.title, tc %> <span class="divider">/</span></li>
  <li class="active">从Excel中导入出勤信息</li>
</ul>
<p>简单粗暴的把文件拖进来...只支持"xls"格式.
</p>
<input id="tid" value="<%= params[:cid] %>" type="hidden"/>
<div id="file-uploader">
  <noscript>
    <p>Please enable JavaScript to use file uploader.</p>
  </noscript>
</div>
<script>
    function createUploader() {
        var uploader = new qq.FileUploader({
            element: document.getElementById('file-uploader'),
            action: '/do_inport',
            debug: false,
            allowedExtensions: ['xls'],
            params: {
                tid: $("#tid").val()
            }
        });
    }
    window.onload = createUploader;
</script>